/**
 * Created by nttdata on 2017/6/8.
 */


//导入ws模块
var webSocketServer = require('ws').Server
//用端口初始化一个对象
wss = new webSocketServer({port: 8181})
//连接中进行的操作
wss.on('connection', function (ws) {
    console.log("client connected!")
    ws.on("message", function (message) {
        console.log(message)
        ws.send(message)
    })
})
